<jsp:include page="/include/head.jspf"/>		
<%@page import="java.util.*, com.atech.ace.entity.*" %>
<jsp:useBean id="catalog" scope="request" class="java.util.LinkedHashMap" />	
	<div align="center">
<table bgcolor="white" border="1" width="95%" cellpadding="5" cellspacing="5">
<%
  Iterator i = catalog.entrySet().iterator();
  while(i.hasNext())
  {
     Map.Entry me = ( Map.Entry ) i.next();
     Category c = ( Category ) me.getKey();
     List products = ( List ) me.getValue();
     Iterator pi = products.iterator();     
 %>
 <tr><td colspan="2" bgcolor="blue"><font color="white"><b><%=c.getDescription()%></b></font></td></tr>
 <tr>
 <%
   	  int counter = 0;
      while(pi.hasNext())
      {
        Product product = ( Product ) pi.next();
  %>
  <td><img src="/ACEShopWeb/<%=product.getImageUrl()%>" width="168" height="168"/>&nbsp;<%=product.getName()%><br />
  <%=product.getDescription()%>
  <br />
  <i>login to see prices and purchase</i></td>
  <%
     	if(counter % 2 == 0)
     	{
   %>
   </tr><tr>
   <%	}    
   	  }
   	 }
   %>
   
</table>	
</div>
<jsp:include page="/include/footer.jspf"/>